package com.module.msg.bean;

import android.text.TextUtils;

import androidx.annotation.Keep;

import com.module.app.bean.MsgObjectBean;
import com.module.base.utils.CommonUtils;
import com.module.msg.R;
import com.module.third.bean.IThirdType;
import com.module.third.bean.lc.MyLCObject;

import java.io.Serializable;

@Keep
public class MsgBean implements Serializable, MyLCObject {
    private String objectId;
    private boolean isHot;//是否上热门榜
    private String url;
    private boolean isVideo;
    private String title;
    private String content;
    private String author;//目前没有，暂时备份
    private String message;//留言，通常为开发者留言
    private int supportNum;//支持
    private int opposeNum;//反对
    private String btnName;
    private String userId;
    private String userName;

    private @IMsgType.IStatus
    int status;
    private @IThirdType.IJump
    int jump;
    private MsgObjectBean object;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public @IMsgType.IStatus
    int getStatus() {
        return status;
    }

    public void setStatus(@IMsgType.IStatus int status) {
        this.status = status;
    }

    public int getSupportNum() {
        return supportNum;
    }

    public void setSupportNum(int supportNum) {
        this.supportNum = supportNum;
    }

    public int getOpposeNum() {
        return opposeNum;
    }

    public void setOpposeNum(int opposeNum) {
        this.opposeNum = opposeNum;
    }

    public boolean isHot() {
        return isHot;
    }

    public void setHot(boolean hot) {
        isHot = hot;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getJump() {
        return jump;
    }

    public void setJump(int jump) {
        this.jump = jump;
    }

    public String getBtnName() {
        if (TextUtils.isEmpty(btnName)) {
            return CommonUtils.getString(R.string.go_to);
        }
        return btnName;
    }

    public void setBtnName(String btnName) {
        this.btnName = btnName;
    }

    @Override
    public String getObjectId() {
        return objectId;
    }

    @Override
    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public String getClassName() {
        return null;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public MsgObjectBean getObject() {
        if (object == null) {
            object = new MsgObjectBean();
        }
        return object;
    }

    public void setObject(MsgObjectBean object) {
        this.object = object;
    }

    public boolean isVideo() {
        return isVideo;
    }

    public void setVideo(boolean video) {
        isVideo = video;
    }
}
